import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      meta: { isShowTab: true },
    },
    {
      path: '/mine',
      children: [
        {
          path: '',
          name: 'mine',
          component: () => import("../views/Mine.vue"),
          meta: { isShowTab: true },
        },
        {
          path: 'resume',
          name: 'resume',
          component: () => import("../views/Resume.vue"),
          meta: { isShowTab: false },
        },
        {
          path: 'hotSearch',
          children: [
            {
              path: '',
              name: 'hotSearch',
              component: () => import("../views/HostSearchNews.vue"),
              meta: { isShowTab: false },
            },
            {
              path: 'wb',
              name: 'wb',
              component: () => import("../views/WbHotSearchNews.vue"),
              meta: { isShowTab: false },
            },
            {
              path: 'zh',
              name: 'zh',
              component: () => import("../views/ZHHotSearchNews.vue"),
              meta: { isShowTab: false },
            },
            {
              path: 'bd',
              name: 'bd',
              component: () => import("../views/BDHotSearchNews.vue"),
              meta: { isShowTab: false },
            },
          ]
        }
      ]
    },
    {
      path: '/blog',
      name: 'blog',
      component: () => import("../views/Blog.vue"),
      meta: { isShowTab: true },
    },
    {
      path: '/blogDetail',
      name: 'blogDetail',
      component: () => import("../views/BlogDetail.vue"),
      meta: { isShowTab: false },
    },
    {
      path: '/login',
      name: 'login',
      component: () => import("../views/Login.vue"),
      meta: { isShowTab: false },
    },
  ]
})

export default router
